#include <bits/stdc++.h>
using namespace std;
int n,a[200010],t;
int main(){
    freopen("color.in","r",stdin);
    freopen("color.out","w",stdout);
    cin >> t;
    for(int k = 0;k < t;k++){
    cin >> n;
    for(int i = 0;i < n;i++) cin >> a[i];
    cout << n*3;
    }
}
